<?php

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

loadcache('plugin');
//读取后台设置的参数返回的是数组
@extract($_G['cache']['plugin']['jl_test']);
$fl=parconfig($category);//分类
$qy=parconfig($area);//区域
$sq=parconfig($circle);//商圈

$query=DB::query("SELECT * FROM ".DB::table('plugin_shangjia'));
$shop=DB::fetch_all($query);
var_dump($shop);
include template('jl_test:show');


function parconfig($str){
$return=array();
$array=explode("\n",str_replace("\r","",$str));
foreach ($array as $v){
   $t=explode("=",$v);
   $t[0]=trim($t[0]);
   $return[$t[0]]=$t[1];
}
return $return;
}
